package jmvm.components;


public class KMADR2 extends LogicalComponent {
	public KMADR2() {
		super(8, 1, false);
		out[0].setIsInt();
	}

	public void func() {
		int i = 0;
		for (i = 0; i < in.length; i++) {
			if (in[i].getBoolVal())
				break;
		}
		switch (i) { // DEC OPR HEX
		case 0:
			out[0].setIntVal(0x21);
			break; // regdir
		case 1:
			out[0].setIntVal(0x25);          /// GRESKA U PRVOM DELU U MATERIJALIMA PISE 0x25 ????????????? ipak nije greska??
			break; // regind
		case 2:
			out[0].setIntVal(0x27);
			break; // memdir
		case 3:
			out[0].setIntVal(0x29);
			break; // memind
		case 4:
			out[0].setIntVal(0x32);
			break; // regindpom
		case 5:
			out[0].setIntVal(0x36);
			break; // bxpom
		case 6:
			out[0].setIntVal(0x3C);
			break; // pcpom
		case 7:
			out[0].setIntVal(0x48);
			break; // imm

		}
	}
}
